package com.jade.explorer.menu;

import java.util.ArrayList;

/**
 * This Class collect all actions from plug-ins and supplies them to to menu managers  
 * @author Alexander Sokol
 */
public class ActionContributor {
	
	private ArrayList<JadeAction> _actionList = new ArrayList<JadeAction>();
	private ArrayList<JadeAction> _doubleClickList = new ArrayList<JadeAction>();
	
	
	/**
	 * Basic constructor that creates and collect all actions
	 */
	ActionContributor(){
		//TODO Action contribution constructor
		//collect actions from plug-ins
		built_inActions();
	}
	
	
	/**
	 * returns list of context actions
	 * @return <code>ArrayList<JadeAction></code> list
	 */
	public ArrayList<JadeAction> getActionList(){
		return _actionList;
	}
	
	
	/**
	 * returns list of Double click actions
	 * @return <code>ArrayList<JadeAction></code> list
	 */
	public ArrayList<JadeAction> getDoubleClickList(){
		return _doubleClickList;
	}
	
	
	/**
	 * Here creates all built-in actions for Project Explorer
	 */
	private void built_inActions(){
		//TODO write all built-in actions
		JadeAction deleteObject = new JadeAction(){
			public void run(){
				System.out.println();
				System.out.println(">>>");
				System.out.println();
			}
		};
		deleteObject.setMenuType(MenuType.OBJECT);
		deleteObject.setActionType(ActionType.ONECLICK);
		
	}

}
